//课程介绍页面，显示顶部bar
$(function () {
    if ($("body.class.info.archive").length == 0) {
        return;
    }

    var e = $(".m_next"), t = e.offset().top, a = e.height(), s = t + a;
    $watchBtnBar = $("#watchBtnBar"), $(window).on("scroll", function () {
        var e = $(this).scrollTop();
        e > s ? $watchBtnBar.hasClass("appear") || $watchBtnBar.addClass("appear") : $watchBtnBar.hasClass("appear") && $watchBtnBar.removeClass("appear")
    });


    //如果高度 < 240 不显示 展开按钮
    $(".foldingArea > *").each(function () {
        $(this).height() <= 242 && $(this).parent().parent().children(".showFoldingButton").hide()
    })

    //点击按钮后
    $(".showFoldingButton").click(function (e) {
        e.preventDefault();
        foldingArea = $(e.currentTarget).parent().children(".foldingArea");
        foldingArea.addClass("is_show");
        $(e.currentTarget).remove();
    })

})